1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527 |
- <template>
- <div>
- <!-- 页面头部 -->
- <HomePageHead></HomePageHead>
- <!-- 页面导航 -->
- <HomePageNavigation></HomePageNavigation>
- <!-- 二级标题-->
- <HomeSecondaryHeading :titleName="routeName" :titleData="pageCategory"></HomeSecondaryHeading>
- <!-- {{ name }} -->
- <!-- 第一层 -->
- <div class="farmingPartOne">
- <div class="inner">
- <div class="innerLeft" v-if="pageData[0]">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[0].cid}`}" target="_blank" v-if="pageData[0]">
- {{ pageData[0].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[0].cid}`}"
- target="_blank" v-if="pageData[0]">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="leftTop">
- <div class="leftTopPhoto left" >
- <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==1">
- <img :src="pageData[0].data[0].imgurl">
- <span>{{pageData[0].data[0].title }}</span>
- </NuxtLink>
- <NuxtLink :to="{ path: `/newsDetail/${pageData[0].data[0].id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==0">
- <img :src="pageData[0].data[0].imgurl">
- <span>{{pageData[0].data[0].title}}</span>
- </NuxtLink>
- </div>
- <ul class="left">
- <li v-for="item in pageData[0].data">
- <em></em>
- <span>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}
- </NuxtLink>
- </span>
- </li>
- </ul>
- </div>
- <ul class="leftBottom" v-if="pageData[0]">
- <li v-for="item in pageData[0].data2">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- </NuxtLink>
- <p>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- <div class="innerRight" v-if="pageData[1].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[1].cid}`}" target="_blank" v-if="pageData[1]">
- {{ pageData[1].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[1].cid}`}"
- v-if="pageData[1]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <ul class="rightList">
- <li v-for="item in pageData[1].data">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img class="left" :src="item.imgurl">
- </NuxtLink>
- <p class="left">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- {{ item.title }}
- </NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 三农资讯logo -->
- <HomeSannongzixun></HomeSannongzixun>
- <!-- 第二层 -->
- <div class="farmingPartTwo" v-if="pageData[2].cid!=''&&pageData[3].cid!=''&&pageData[4].cid!=''">
- <div class="inner">
- <div class="farmer" v-if="pageData[2].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[2].cid}`}" target="_blank" v-if="pageData[2]">
- {{ pageData[2].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid } }"
- v-if="pageData[2]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[2].data[0].islink==1">
- <img :src="pageData[2].data[0].imgurl">
- <span>{{ pageData[2].data[0].title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${pageData[2].data[0].id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="pageData[2].data[0].islink==0">
- <img :src="pageData[2].data[0].imgurl">
- <span>{{ pageData[2].data[0].title }}</span>
- </NuxtLink>
- </div>
- <ul class="PartTwoList">
- <li v-for="item in pageData[2].data">
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- <div class="farmer" v-if="pageData[3].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[3].cid}`}" target="_blank" v-if="pageData[3]">
- {{ pageData[3].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
- v-if="pageData[3]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[3].data[0].islink==1">
- <img :src="pageData[3].data[0].imgurl">
- <span>{{ pageData[3].data[0].title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${pageData[3].data[0].id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="pageData[3].data[0].islink==0">
- <img :src="pageData[3].data[0].imgurl">
- <span>{{ pageData[3].data[0].title }}</span>
- </NuxtLink>
- </div>
- <ul class="PartTwoList">
- <li v-for="item in pageData[3].data">
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- <div class="farmer" v-if="pageData[4].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[4].cid}`}" target="_blank" v-if="pageData[4]">
- {{ pageData[4].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
- v-if="pageData[4]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[4].data[0].islink==1">
- <img :src="pageData[4].data[0].imgurl">
- <span>{{ pageData[4].data[0].title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${pageData[4].data[0].id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="pageData[4].data[0].islink==0">
- <img :src="pageData[4].data[0].imgurl">
- <span>{{ pageData[4].data[0].title }}</span>
- </NuxtLink>
- </div>
- <ul class="PartTwoList">
- <li v-for="item in pageData[4].data">
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 三农资讯logo -->
- <HomeSannongzixun></HomeSannongzixun>
- <!-- 第三层 -->
- <div class="zixuntuijian" v-if="pageData[5].cid!=''&&pageData[6].cid!=''&&pageData[7].cid!=''&&pageData[8].cid!=''&&pageData[9].cid!=''">
- <div class="inner">
- <div class="innerLeft" >
- <div class="zixunTop">
- <div class="zixunLeft" v-if="pageData[5].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[5].cid}`}" target="_blank" v-if="pageData[5]">
- {{ pageData[5].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
- v-if="pageData[5]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <ul class="photo_text">
- <li v-for="(item, index) in pageData[5].data">
- <article v-if="index == 0">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl" alt="">
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl" alt="">
- </NuxtLink>
- <div>
- <h5>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </h5>
- <p>
- <span>{{ item.author }}</span>
- <span>{{ getDays(item.created_at) }}</span>
- </p>
- </div>
- </article>
- <article v-else>
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </article>
- </li>
- </ul>
- </div>
- <div class="zixunRight" v-if="pageData[6].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[6].cid}`}" target="_blank" v-if="pageData[6]">
- {{ pageData[6].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
- v-if="pageData[6]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="towPic">
- <div v-for="(item, index) in pageData[6].data" class="picBox">
- <div v-if="index <= 1">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- </NuxtLink>
- </div>
- </div>
- </div>
- <ul class="photo_text">
- <li v-for="(item, index) in pageData[6].data">
- <article v-if="index > 1">
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </article>
- </li>
- </ul>
- </div>
- </div>
- <div class="zixunBottom" v-if="pageData[6].cid!=''">
- <img class="left" :src="pageData[7].data[0].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 0">
- <img class="left" :src="pageData[7].data[1].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 1">
- <img class="left" :src="pageData[7].data[2].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 2">
- <img class="left" :src="pageData[7].data[3].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 3">
- <img class="left" :src="pageData[7].data[4].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 4">
- <img class="left" :src="pageData[7].data[5].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 5">
- <ul class="leftList left">
- <li v-for="(item, index) in pageData[7].data" @mouseenter="qhPic(index)">
- <h4>
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </h4>
-
- </li>
- </ul>
- </div>
- </div>
- <div class="innerRight" v-if="pageData[8].cid!=''">
- <div class="title">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[8].cid}`}" target="_blank" v-if="pageData[8]">
- {{ pageData[8].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid } }"
- v-if="pageData[8]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <ul class="information">
- <li v-for="item in pageData[8].data">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- </NuxtLink>
- <div class="text">
- <h5>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </h5>
- <p>{{ item.author }}</p>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <HomeTopTen :imgurl="adList[2]" v-if="adList[2]"></HomeTopTen>
- <div class="farming" v-if="pageData[9].cid!=''&&pageData[10].cid!=''&&pageData[11].cid!=''">
- <div class="inner">
- <div class="innerLeft" v-if="pageData[9].cid!=''">
- <div class="farmer">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[9].cid}`}" target="_blank" v-if="pageData[9]">
- {{ pageData[9].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid } }"
- v-if="pageData[9]" target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- <ul>
- <li v-for="item in pageData[9].data">
- <em></em>
- <span>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- </div>
- <div class="farmer">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[10].cid}`}" target="_blank" v-if="pageData[10]">
- {{ pageData[10].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid } }"
- target="_blank" v-if="pageData[10]">查看更多</NuxtLink>
- </span>
- </h3>
- <ul>
- <li v-for="item in pageData[10].data">
- <em></em>
- <span>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- </div>
- </div>
- <div class="innerRight" v-if="pageData[11].cid!=''">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[11].cid}`}" target="_blank" v-if="pageData[11]">
- {{ pageData[11].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid } }"
- target="_blank" v-if="pageData[11]">查看更多</NuxtLink>
- </span>
- </h3>
- <div class="banner">
- <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
- </div>
- <div class="banner_b_img">
- <div class="photo">
- <article v-for="(item, index) in pageData[11].data2">
- <div class="photoL" v-if="index == 0">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- <div class="photoL" v-if="index == 1">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- </article>
- </div>
- </div>
- <div class="banner_text_list">
- <ul>
- <li v-for="item in pageData[11].data3">
- <em></em>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <span>{{ item.title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 十强称号logo -->
- <HomeTopTenTitle></HomeTopTenTitle>
- <!-- 第五层 -->
- <div class="scienceEducation" v-if="pageData[12].cid!=''&&pageData[13].cid!=''">
- <div class="inner">
- <div class="innerLeft" v-if="pageData[12].cid!=''">
- <div class="slider">
- <div class="scienceTitle">
- <h5>
- <NuxtLink :to="{ path: `/newsList/${pageData[12].cid}`}" target="_blank" v-if="pageData[12]">
- {{ pageData[12].title }}
- </NuxtLink>
- </h5>
-
- <p class="title">
- <span v-if="pageData[12]" @click="qhtabs(1)">
- <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
- </span>
- <span v-if="pageData[12]" @click="qhtabs(2)">
- <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
- </span>
- <span v-if="pageData[12]" @click="qhtabs(3)">
- <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
- </span>
- <span v-if="pageData[12]" @click="qhtabs(4)">
- <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
- </span>
- </p>
- </div>
- <div class="box">
- <div class="scienceListBox">
- <ul class="scienceList" v-if="showTabs == 1">
- <li v-for="item in pageData[12].data1">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
- <p>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- <ul class="scienceList" v-if="showTabs == 2">
- <li v-for="item in pageData[12].data2">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
- <p>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- <ul class="scienceList" v-if="showTabs == 3">
- <li v-for="item in pageData[12].data3">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
- <p>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- <ul class="scienceList" v-if="showTabs == 4">
- <li v-for="item in pageData[12].data4">
- <img :src="item.imgurl">
- <p>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="innerRight" v-if="pageData[13].cid!=''">
- <h3>
- <NuxtLink :to="{ path: `/newsList/${pageData[13].cid}`}" target="_blank" v-if="pageData[13]">
- {{ pageData[13].title }}
- </NuxtLink>
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid } }"
- target="_blank" v-if="pageData[13]">查看更多</NuxtLink>
- </span>
- </h3>
- <ul class="sannongList">
- <li v-for="item in pageData[13].data3">
- <em></em>
- <span>
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- <div class="banner">
- <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
- </div>
- <div class="banner_b_img">
- <div class="photo">
- <article v-for="(item, index) in pageData[13].data2">
- <div class="photoL" v-if="index == 0">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- <div class="photoL" v-if="index == 1">
- <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank" v-if="item.islink==0">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- </article>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 页脚部分 -->
- <HomeFoot></HomeFoot>
- </div>
- </template>
- <script setup>
- //获取生命周期
- import { onMounted } from 'vue';
- //获得跳转过来的id
- const route = useRoute();
- const routeId = route.params.id; //获得该页面的id
- const routeName = route.query.name; //获得该页面的名称
- //获取行政部门和地区
- const cityid = route.query.cityid;
- const depId = route.query.department_id;
- //获得axios
- const nuxtApp = useNuxtApp();
- const axios = nuxtApp.$axios;
- // 定义响应式数据
- const seoData = ref({
- title: '三农资讯网',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- });
- const hoverStatus = ref(1)
- const qhPic = function (num) {
- console.log(num)
- hoverStatus.value = num;
- }
- //获得所有广告
- const adList = ref("");
- const getadList = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteAdvertisement`);
- adList.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- // 在 onMounted 钩子中获取数据
- onMounted(async () => {
- // try {
- // const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${routeId}`);
- // const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
- // console.log(seoData.value.title)
- // // 更新 seoData
- // seoData.value = {
- // title: data.seo_title,
- // description: data.seo_description,
- // keywords: data.seo_keywords,
- // image: data.seo_image
- // };
- // console.log(seoData.value.title)
- // } catch (error) {
- // console.error('获取 SEO 数据失败:', error);
- // // 设置默认值
- // seoData.value = {
- // title: '三农资讯网',
- // description: '默认描述',
- // keywords: '默认关键词',
- // image: 'https://example.com/default-image.jpg'
- // };
- // }
- });
- // 监听 seoData 的变化,动态设置 SEO 字段
- watch(seoData, (newVal) => {
- if (newVal.title) { // 确保 title 有值
- useSeoMeta({
- title: newVal.title, // 使用动态值
- description: newVal.description,
- ogTitle: newVal.title,
- ogDescription: newVal.description,
- ogImage: newVal.image,
- twitterTitle: newVal.title,
- twitterDescription: newVal.description,
- twitterImage: newVal.image,
- keywords: newVal.keywords
- });
- }
- }, { immediate: true });
- //该页面上所有的导航池 转为动态数据
- const pageCategory = ref([]);
- //该页面上需要渲染的所有数据
- const pageData = ref([
- { id: 0, data: [], data2: [], title: "", cid: "" },
- { id: 1, data: [], title: "", cid: "" },
- { id: 2, data: [], title: "", cid: "" },
- { id: 3, data: [], title: "", cid: "" },
- { id: 4, data: [], title: "", cid: "" },
- { id: 5, data: [], title: "", cid: "" },
- { id: 6, data: [], title: "", cid: "" },
- { id: 7, data: [], title: "", cid: "" },
- { id: 8, data: [], title: "", cid: "" },
- { id: 9, data: [], title: "", cid: "" },
- { id: 10, data: [], title: "", cid: "" },
- { id: 10, data: [], title: "", cid: "" },
- {
- id: 11,
- title: "",
- data: [],
- data1: [],
- data2: [],
- data3: [],
- data4: [],
- category_id1: "",
- category_id2: "",
- category_id3: "",
- category_id4: "",
- title1: "",
- title2: "",
- title3: "",
- title4: "",
- cid: ""
- },
- { id: 12, data1: [], data2: [], data3: [], cid: "" },
- ])
- //第一种情况 直接获得二级导航
- //第一步:获得该分类下的所有二级导航
- const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
- //placeid 固定为1
- //pid 由上个页面带过来的1级导航id
- //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
- const getWebsiteModelCategory = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
- pageCategory.value = response.data;
- //给与板块标题
- for (let index in response.data) {
- pageData.value[index].title = response.data[index].name
- pageData.value[index].cid = response.data[index].category_id
- }
- console.log(pageData.value)
- console.log('pageCategory111111111111111', pageCategory.value)
- renderPage();
- } catch (error) {
- console.error(error);
- }
- }
- //第二种情况 用户搜索的二级导航
- const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
- //placeid 固定为1
- //pid 由上个页面带过来的1级导航id
- //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
- const selectWebsiteCategory = async () => {
- try {
- const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
- pageCategory.value = response.data;
- //给与板块标题
- for (let index in response.data) {
- pageData.value[index].title = response.data[index].name
- }
- console.log(pageData.value)
- console.log(pageCategory.value)
- renderPage2();
- } catch (error) {
- console.error(error);
- }
- }
- //第二步:获得对应分类下的数据
- const renderPage = function () {
- console.log("当前获取到:" + pageCategory.value.length + "个导航")
- //循环pageCategory.value.length的次数执行getWebsiteArticlesList
- for (let i = 0; i <= pageCategory.value.length - 1; i++) {
- getWebsiteArticlesList(pageCategory.value[i].category_id, i)
- }
- }
- //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
- const renderPage2 = function () {
- console.log("当前获取到:" + pageCategory.value.length + "个导航")
- //循环pageCategory.value.length的次数执行getWebsiteArticlesList
- for (let i = 0; i <= pageCategory.value.length - 1; i++) {
- getWebsiteArticlesList(pageCategory.value[i].id, i)
- }
- }
- //第三步循环获取数据
- const getWebsiteArticlesList = async (name, listType) => {
- //第一层
- //板块1 图文
- if (listType == 0) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
- pageData.value[0].data = response.data
- const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
- pageData.value[0].data2 = response2.data
- }
- //板块2 图文
- if (listType == 1) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
- pageData.value[1].data = response.data;
- }
- //第二层
- //板块3 图文
- if (listType == 2) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
- pageData.value[2].data = response.data;
- }
- //板块4 图文
- if (listType == 3) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
- pageData.value[3].data = response.data;
- }
- //板块5 图文
- if (listType == 4) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
- pageData.value[4].data = response.data;
- }
- //第三层
- //板块6 图文
- if (listType == 5) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
- pageData.value[5].data = response.data;
- }
- //板块7 图文
- if (listType == 6) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
- pageData.value[6].data = response.data;
- }
- //板块8 图文
- if (listType == 7) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
- pageData.value[7].data = response.data;
- }
- //板块9 图文
- if (listType == 8) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
- pageData.value[8].data = response.data;
- }
- //第四层
- //板块10 文字
- if (listType == 9) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
- pageData.value[9].data = response.data;
- }
- //板块11 文字
- if (listType == 10) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
- pageData.value[10].data = response.data;
- }
- //板块12 轮播图 图文 文字
- if (listType == 11) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
- pageData.value[11].data = response.data;
- const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
- pageData.value[11].data2 = response2.data;
- const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
- pageData.value[11].data3 = response3.data;
- }
- //第五层
- //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
- if (listType == 12) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
- pageData.value[12].data = response.data;
- console.log("第一步获取父级id")
- console.log(pageCategory.value[12].children_count)
- console.log(pageCategory.value[12].category_id)
- //判断一下里面有没有子导航
- if (pageCategory.value[12].children_count != 0) {
- //开始请求子导航
- const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
- console.log("第二步获取子级数量")
- console.log(response.data.length)
- //获得标题
- //判断里面有几个
- for (let i = 1; i <= response.data.length; i++) {
- if (i == 1) {
- pageData.value[12].title1 = response.data[0].name
- pageData.value[12].category_id1 = response.data[0].category_id
- }
- if (i == 2) {
- pageData.value[12].title2 = response.data[1].name
- pageData.value[12].category_id2 = response.data[1].category_id
- }
- if (i == 3) {
- pageData.value[12].title3 = response.data[2].name
- pageData.value[12].category_id3 = response.data[2].category_id
- }
- if (i == 4) {
- pageData.value[12].title4 = response.data[3].name
- pageData.value[12].category_id4 = response.data[3].category_id
- }
- }
- //获得内容
- //第三步:有几个就循环几次
- for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
- if (i == 1) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
- pageData.value[12].data1 = response.data
- }
- if (i == 2) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
- pageData.value[12].data2 = response.data
- }
- if (i == 3) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
- pageData.value[12].data3 = response.data
- }
- if (i == 4) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
- pageData.value[12].data4 = response.data
- }
- }
- }
- }
- //板块13 轮播图 图文 文字
- if (listType == 13) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
- pageData.value[13].data = response.data;
- const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
- pageData.value[13].data2 = response2.data;
- const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
- pageData.value[13].data3 = response3.data;
- }
- }
- let scienceTitleList = [
- {
- id: 1,
- title: "农产畅销"
- },
- {
- id: 2,
- title: "农业在线"
- },
- {
- id: 3,
- title: "农产行情"
- },
- {
- id: 4,
- title: "名优特产"
- }
- ]
- //鼠标移入标题时,下方内容会发生变化
- let changeUl = (index) => {
- // console.log(index);
- if (process.browser) {
- let scienceListBox = document.querySelector('.scienceListBox');
- let titleList = document.querySelectorAll('.title>span>a')
- for (let i = 0; i < titleList.length; i++) {
- titleList[i].className = ''
- }
- titleList[index].setAttribute('class', 'current')
- if (index == 0) {
- scienceListBox.style.left = 0
- } else if (index == 1) {
- scienceListBox.style.left = "-790px"
- } else if (index == 2) {
- scienceListBox.style.left = "-1580px"
- } else if (index == 3) {
- scienceListBox.style.left = "-2370px"
- }
- }
- }
- //显示哪个tabs
- let showTabs = ref(1)
- let qhtabs = function (number) {
- console.log(number)
- showTabs.value = number
- }
- //挂载成功钩子函数
- onMounted(() => {
- //判断一下应该走搜索还是直接走二级分类
- console.log(111111)
- console.log(cityid)
- console.log(cityid != undefined)
- console.log(depId != undefined)
- if (cityid != undefined || depId != undefined) {
- console.log(7777777777)
- console.log(cityid)
- console.log(depId)
- //获得用户搜索的导航
- selectWebsiteCategory()
- } else {
- console.log(888888888)
- //直接获得所有二级导航
- getWebsiteModelCategory()
- }
- })
- function getDays(time) {
- const date = new Date(time);
- const year = date.getFullYear();
- const month = date.getMonth() + 1;
- const day = date.getDate();
- return `${month}-${day}`;
- }
- </script>
- <style lang="less" scoped>
- a {
- color: #333333;
- }
- //农民工part1
- .farmingPartOne {
- width: 100%;
- height: 600px;
- .inner {
- height: 600px;
- .innerLeft {
- height: 600px;
- .leftTop {
- margin-top: 20px;
- height: 320px;
- .leftTopPhoto {
- width: 387px;
- height: 320px;
- position: relative;
- img {
- width: 387px;
- height: 320px;
- }
- span {
- display: inline-block;
- width: 387px;
- height: 50px;
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
- color: #FFFFFF;
- position: absolute;
- bottom: 0;
- left: 0;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 20px;
- line-height: 23px;
- padding-top: 11px;
- padding-left: 13px;
- box-sizing: border-box;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- }
- >ul.left {
- margin-left: 25px;
- width: 362px;
- height: 320px;
- margin-top: 5px;
- >li {
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- background-color: #d9d9d9;
- margin-right: 8px;
- vertical-align: middle;
- }
- width: 362px;
- height: 22px;
- font-family: PingFang SC,
- PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 22px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 19px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- >li:hover {
- a {
- color: #088f04;
- }
- color: #088f04;
- }
- >li:hover>em {
- background-color: #088f04;
- }
- }
- }
- .leftBottom {
- height: 202px;
- margin-top: 21px;
- >li {
- float: left;
- width: 185px;
- height: 202px;
- margin-right: 10px;
- >a {
- >img {
- width: 185px;
- height: 139px;
- }
- }
- >p {
- width: 185px;
- height: 58px;
- padding: 8px 5px 12px;
- box-sizing: border-box;
- background-color: #f5f5f5;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 限制显示的行数 */
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- >li:hover {
- a {
- color: #088f04;
- }
- }
- >li:last-child {
- margin: 0;
- }
- }
- }
- .innerRight {
- .rightList {
- height: 540px;
- margin-top: 20px;
- >li {
- height: 100px;
- margin-bottom: 10px;
- img {
- width: 150px;
- height: 100px;
- }
- >p {
- width: 219px;
- height: 100px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 4;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- padding-left: 12px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #333333;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p:hover {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- a {
- color: #088f04;
- }
- }
- }
- }
- }
- }
- }
- //农民工part2
- .farmingPartTwo {
- width: 100%;
- height: 600px;
- .inner {
- width: 1200px;
- height: 600px;
- >.farmer {
- float: left;
- width: 380px;
- height: 600px;
- margin-right: 29px;
- // 农民工part2标题
- >.title {
- width: 380px;
- }
- >.title>h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- }
- >.title>h3>span>a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- // 农民工part2图片
- .PartTwoPhoto {
- width: 380px;
- height: 280px;
- margin-top: 20px;
- position: relative;
- img {
- width: 380px;
- height: 280px;
- }
- span {
- display: inline-block;
- width: 380px;
- height: 50px;
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
- color: #FFFFFF;
- position: absolute;
- bottom: 0;
- left: 0;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 20px;
- line-height: 23px;
- padding-top: 11px;
- padding-left: 13px;
- box-sizing: border-box;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- }
- //农民工part2文字列表
- .PartTwoList {
- width: 380px;
- height: 263px;
- background-color: #fff;
- box-shadow: 0px 4px 30px 1px rgba(174, 174, 174, 0.25);
- padding-top: 20px;
- box-sizing: border-box;
- >li {
- width: 380px;
- height: 25px;
- line-height: 25px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- margin-bottom: 16px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #d9d9d9;
- border-radius: 8px;
- margin-left: 19px;
- margin-right: 10px;
- }
- }
- >li:hover {
- color: #139602;
- a {
- color: #088f04;
- }
- }
- >li:hover>em {
- background-color: #139602;
- }
- }
- }
- >.farmer:last-child {
- margin-right: 0;
- }
- }
- }
- //资讯推荐
- .zixuntuijian {
- width: 100%;
- height: 600px;
- .innerLeft {
- // 左侧的上半部分
- .zixunTop {
- height: 286px;
- .zixunLeft,
- .zixunRight {
- float: left;
- width: 380px;
- height: 286px;
- .towPic {
- display: flex;
- width: 380px;
- height: 116px;
- margin-top: 20px;
- .picBox {
- width: 50%;
- text-align: center;
- }
- .picBox:nth-child(3),
- .picBox:nth-child(4),
- .picBox:nth-child(5) {
- display: none;
- }
- img {
- width: 190px;
- height: 120px;
- }
- .picBox:first-child {
- margin-right: 5px;
- }
- }
- // 标题部分
- >.title {
- width: 380px;
- }
- >.title>h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- }
- >.title>h3>span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- .photo_text {
- article {
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- li {
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- a:hover {
- color: #088f04;
- }
- }
- li:hover {
- color: #088f04;
- a {
- color: #088f04;
- }
- }
- img {
- width: 100px;
- }
- }
- li {
- width: 380px;
- height: 25px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 9px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- margin-right: 10px;
- background-color: #d9d9d9;
- }
- }
- }
- }
- // 左侧的资讯推荐的左半部分
- .zixunLeft {
- margin-right: 30px;
- .photo_text {
- li:first-child {
- width: 380px;
- height: 120px;
- margin-top: 20px;
- margin-bottom: 16px;
- position: relative;
- img {
- float: left;
- width: 160px;
- height: 120px;
- }
- div {
- float: left;
- width: 220px;
- height: 120px;
- padding-left: 15px;
- padding-top: 6px;
- box-sizing: border-box;
- background-color: #f6f6f6;
- h5 {
- width: 200px;
- height: 54px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- p {
- width: 200px;
- height: 22px;
- line-height: 20px;
- position: absolute;
- bottom: 5px;
- right: 0;
- span {
- display: inline-block;
- width: 75px;
- height: 18px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- text-align: left;
- line-height: 14px;
- font-style: normal;
- text-transform: none;
- }
- span:last-child {
- width: 90px;
- text-align: right;
- }
- }
- }
- }
- >li {
- width: 380px;
- height: 25px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 9px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- margin-right: 10px;
- background-color: #d9d9d9;
- }
- }
- }
- }
- // 左侧的资讯推荐的右半部分
- .zixunRight {
- width: 380px;
- height: 229px;
- .photo_text {
- margin-top: 20px;
- >li:nth-child(1) {
- display: none;
- }
- >li:nth-child(2) {
- display: none;
- }
- }
- }
- }
- //左侧的下半部分
- .zixunBottom {
- width: 790px;
- height: 280px;
- margin-top: 40px;
- img {
- width: 498px;
- height: 280px;
- }
- >.leftList {
- width: 290px;
- height: 280px;
- background-color: #f6f6f6;
- padding: 11px 26px 6px 20px;
- box-sizing: border-box;
- >li {
- width: 296px;
- height: 35px;
- line-height: 35px;
- color: #666666;
- font-size: 14px;
- margin-bottom: 18px;
- h4 {
- font-family: Source Han Sans, Source Han Sans;
- height: 35px;
- line-height: 35px;
- font-size: 18px;
- font-weight: 400;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- color: #333333;
- width: 260px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #333333;
- border-radius: 8px;
- margin-right: 5px;
- }
- }
- p {
- width: 249px;
- height: 48px;
- line-height: 24px;
- padding-left: 14px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 限制显示的行数 */
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- >li:hover,
- >li:hover>h4>a,
- >li:hover>p>a {
- color: #088f04;
- }
- >li:hover>h4>em {
- background-color: #088f04;
- }
- }
- }
- }
- .innerRight {
- .information {
- width: 380px;
- margin-top: 20px;
- >li {
- width: 380px;
- height: 120px;
- margin-bottom: 21px;
- img {
- float: left;
- width: 160px;
- height: 120px;
- }
- .text {
- float: left;
- width: 220px;
- height: 120px;
- padding-left: 15px;
- box-sizing: border-box;
- >h5 {
- width: 199px;
- height: 49px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- padding-top: 6px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p {
- width: 198px;
- height: 20px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- margin-top: 16px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #666666;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-top: 40px;
- }
- }
- .text:hover {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- background-color: #fff;
- h5 {
- a {
- color: #088f04;
- }
- }
- p {
- color: #088f04;
- }
- }
- }
- }
- }
- }
- // 农民工
- .farming {
- width: 100%;
- height: 605px;
- // 左侧
- .innerLeft {
- width: 790px;
- height: 605px;
- margin-right: 21px;
- // background-color: #ccc;
- .farmer {
- width: 790px;
- height: 312px;
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- >ul {
- margin-top: 20px;
- >li {
- float: left;
- width: 362px;
- height: 22px;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- margin-bottom: 29px;
- margin-right: 27px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #d9d9d9;
- border-radius: 4px;
- margin: 5px 8px 6px;
- vertical-align: middle;
- }
- }
- >li:hover {
- color: #139602;
- a {
- color: #139602;
- }
- }
- }
- }
- .farmerbottom {
- width: 790px;
- height: 280px;
- img {
- width: 498px;
- height: 280px;
- }
- >.leftList {
- width: 290px;
- height: 280px;
- background-color: #f6f6f6;
- padding: 11px 26px 6px 20px;
- box-sizing: border-box;
- >li {
- width: 296px;
- height: 75px;
- color: #666666;
- font-size: 14px;
- margin-bottom: 18px;
- h4 {
- font-family: Source Han Sans, Source Han Sans;
- height: 27px;
- line-height: 21px;
- font-size: 18px;
- color: #333333;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #333333;
- border-radius: 8px;
- }
- }
- p {
- width: 249px;
- height: 48px;
- line-height: 24px;
- padding-left: 14px;
- }
- }
- >li:hover,
- >li:hover>h4 {
- color: #088f04;
- }
- >li:hover>h4>em {
- background-color: #088f04;
- }
- }
- }
- }
- // 右侧
- .innerRight {
- width: 380px;
- height: 605px;
- // 标题部分
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- // 轮播图
- .banner {
- width: 380px;
- height: 214px;
- margin-top: 20px;
- }
- .banner_b_img {
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 10px;
- display: flex;
- }
- .photoL,
- .photoR {
- float: left;
- width: 185px;
- height: 104px;
- position: relative;
- img {
- width: 185px;
- height: 104px;
- }
- span {
- position: absolute;
- top: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- }
- .photoL {
- margin-right: 10px;
- }
- }
- .banner_text_list {
- ul {
- width: 380px;
- height: 186px;
- margin-top: 30px;
- >li {
- a {
- height: 22px;
- font-size: 16px;
- &:hover {
- color: #139609;
- }
- }
- height: 22px;
- padding-bottom: 16px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >strong {
- display: inline-block;
- width: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #cecece;
- padding-left: 6px;
- box-sizing: border-box;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- font-style: normal;
- text-transform: none;
- }
- >em {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- border: 2px solid #8CBA86;
- margin-right: 10px;
- }
- >span {
- width: 380px;
- height: 22px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >span:hover {
- color: #139609;
- }
- }
- }
- }
- }
- }
- //三农科教
- .scienceEducation {
- height: 600px;
- margin-bottom: 76px;
- .innerLeft,
- .innerRight {
- float: left;
- }
- // 左侧
- .innerLeft {
- width: 790px;
- height: 616px;
- margin-right: 21px;
- }
- // 右侧
- .innerRight {
- width: 380px;
- height: 600px;
- // 标题部分
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- ul.sannongList {
- width: 380px;
- height: 186px;
- >li {
- height: 22px;
- padding-top: 16px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >strong {
- display: inline-block;
- width: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #cecece;
- padding-left: 6px;
- box-sizing: border-box;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- font-style: normal;
- text-transform: none;
- }
- >em {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- border: 2px solid #8CBA86;
- }
- >span {
- width: 380px;
- height: 22px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding-left: 9px;
- }
- >span:hover {
- color: #139609;
- a {
- color: #088f04;
- }
- }
- }
- }
- // 轮播图
- .banner {
- width: 380px;
- height: 214px;
- margin-top: 45px;
- }
- .banner_b_img {
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 10px;
- display: flex;
- }
- .photoL,
- .photoR {
- float: left;
- width: 185px;
- height: 104px;
- position: relative;
- img {
- width: 185px;
- height: 104px;
- }
- span {
- position: absolute;
- top: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- a {
- color: #fff;
- }
- }
- }
- .photoL {
- margin-right: 10px;
- }
- }
- }
- }
- // 标题
- .scienceTitle {
- height: 37px;
- h5 {
- float: left;
- width: 96px;
- height: 34px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-right: 20px;
- }
- >p {
- float: left;
- height: 37px;
- line-height: 30px;
- display: flex;
- >span {
- display: inline-block;
- //height: 20px;
- line-height: 20px;
- text-align: center;
- margin: 4px 0px 3px;
- padding: 0 20px;
- //border-right: 1px solid #ccc;
- font-weight: 500;
- font-size: 20px;
- cursor: pointer;
- padding-bottom: 11px;
- // >a {
- // display: inline-block;
- // padding-bottom: 11px;
- // font-family: PingFang SC, PingFang SC;
- // font-weight: 500;
- // font-size: 20px;
- // color: #666666;
- // line-height: 20px;
- // font-style: normal;
- // text-transform: none;
- // box-sizing: border-box;
- // }
- .current {
- color: #139602;
- border-bottom: 1px solid #139602;
- }
- }
- >span:nth-child(4) {
- border-right: none;
- }
- >span:hover>a {
- color: #139602;
- border-bottom: 1px solid #139602;
- }
- }
- }
- .box {
- width: 790px;
- height: 570px;
- position: relative;
- overflow: hidden;
- }
- .fade-in {
- animation: fadeIn 1s ease-in-out;
- }
- .fade-enter-from,
- .fade-leave-to {
- opacity: 0;
- }
- .fade-enter-to,
- .fade-leave-from {
- opacity: 1;
- }
- .fade-enter-active,
- .fade-leave-active {
- transition: opacity 1s ease;
- }
- .scienceListBox {
- width: 3160px;
- height: 570px;
- position: absolute;
- top: 0;
- left: 0;
- transition: all 3s linear 0;
- }
- // 标题下列表
- .scienceList {
- width: 790px;
- height: 570px;
- float: left;
- margin-top: 17px;
- >li {
- width: 250px;
- height: 276px;
- float: left;
- margin-right: 20px;
- position: relative;
- img {
- width: 250px;
- height: 220px;
- border-top-left-radius: 40px;
- border-bottom-right-radius: 40px;
- }
- >p {
- height: 50px;
- width: 248px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 限制显示的行数 */
- overflow: hidden;
- text-overflow: ellipsis;
- }
- // >p:hover {
- // color: #139602;
- // }
- }
- >li:hover {
- color: #088f04;
- >p:hover {
- a {
- color: #088f04;
- }
- // color: #139602;
- }
- }
- >li:nth-child(3),
- >li:nth-child(6) {
- margin-right: 0;
- }
- >li::before {
- content: "";
- display: inline-block;
- width: 40px;
- height: 20px;
- position: absolute;
- top: 0;
- right: 0;
- background-image: url("../../static/images/Component 209.png");
- }
- }
- .active {
- border-bottom: 3px solid #139602;
- height: 36px;
- display: inline-block;
- }
- .noSelect {
- border-bottom: 3px solid #fff;
- height: 36px;
- display: inline-block;
- }
- </style>
|